import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-02-28
 * Time: 16:30
 */
public class Test {
    public static void main(String[] args) {
        Map<String,Integer> map=new TreeMap<>();
        map.put("abc",2);
        map.put("poll",4);
        map.put("hello",10);

        Integer val2=map.getOrDefault("abcd",100);
        System.out.println(val2);
        System.out.println("================");
        Set<String> set=map.keySet();
        System.out.println(set);
        Collection<Integer> collection=map.values();
        System.out.println(collection);
        Set<Map.Entry<String,Integer>> set2=map.entrySet();
        for (Map.Entry<String,Integer> entry:set2) {
            System.out.println("key: "+entry.getKey()+"   val: " +entry.getValue());
        }
        Integer[] arr={1,2,3,4,5};
        System.out.println(Arrays.toString(arr));
    }
}
